import ajax from '@/http/axios'

const urlPrefix = '/utilize/reception'

export function list(data, params) {
  return ajax({
    url: urlPrefix + '/list',
    method: 'post',
    data,
    params
  })
}

export function save(data) {
  return ajax({
    url: urlPrefix + '/save',
    method: 'post',
    data
  })
}

export function deleteByIds(data) {
  const ids = data.map(item => item.id)
  return ajax({
    url: urlPrefix + '/deleteByIds',
    method: 'post',
    data: ids
  })
}

export function receptionLogin(data, params) {
  return ajax({
    url: urlPrefix + '/receptionLogin',
    method: 'post',
    data,
    params
  })
}
